package Coffee.controller;

import Coffee.bean.Order;
import Coffee.dao.OrderDao;
import Coffee.dao.OrderDaoImpl;
import Coffee.service.OrderService;
import Coffee.service.OrderServiceImpl;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.UUID;

public class test2 {
    public static void main(String[] args) {
        OrderDao orderDao = new OrderDaoImpl();
        OrderService orderService = new OrderServiceImpl();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String formattedDate = LocalDateTime.now().format(formatter);

        orderService.insertOrder("admin","白兰地",2);
        List<Order> admin = orderDao.queryOrder("admin");
        admin.iterator().forEachRemaining(System.out::println);
    }
}
